import request from "@/utils/request";
// 切换路由页面无法实时切换，导致还是走之前的URL 1.路由守卫刷新  2.直接使用统一baseurl管理
import baseUrl from "@/utils/requestBase";


export function findAllScenic(data) {
	return request({
		url: "/all",
		method: "get",
		baseURL: `${baseUrl.scenic}`,
		params: data,
	});
}

export function findQueryScenic(data) {
	return request({
		url: "/query",
		method: "get",
		baseURL: `${baseUrl.scenic}`,
		params: data,
	});
}

export function addNewScenic(data) {
	return request({
		url: "/add",
		method: "post",
		baseURL: `${baseUrl.scenic}`,
		data,
	});
}

export function deleteScenic(data) {
	return request({
		url: "/delete",
		method: "get",
		baseURL: `${baseUrl.scenic}`,
		params: data,
	});
}

export function stateScenic(data) {
	return request({
		url: "/state",
		method: "get",
		baseURL: `${baseUrl.scenic}`,
		params: data,
	});
}

export function typeAndRegion(data){
	return request({
		url: "/tandr",
		method: "get",
		baseURL: `${baseUrl.scenic}`,
		params: data,
	});
}

export function updateScenic(data){
	return request({
		url: "/update",
		method: "post",
		baseURL: `${baseUrl.scenic}`,
		data,
	});
}

export function findInfo(data){
	return request({
		url: "/info",
		method: "get",
		baseURL: `${baseUrl.scenic}`,
		params: data,
	});
}

